/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-03-17
 * Time: 9:56
 */

public class TestDemo {
    public static void main(String[] args) {
        MySingleLinkedList mySingleLinkedList = new MySingleLinkedList();
        mySingleLinkedList.addFirst(1);
        mySingleLinkedList.addFirst(1);
        mySingleLinkedList.addFirst(1);
        mySingleLinkedList.addFirst(2);
        mySingleLinkedList.addFirst(2);
        mySingleLinkedList.addFirst(2);
        mySingleLinkedList.addFirst(3);
        mySingleLinkedList.addFirst(3);
        mySingleLinkedList.addFirst(3);
        mySingleLinkedList.display();
        mySingleLinkedList.addLast(5);
        mySingleLinkedList.addLast(5);
        mySingleLinkedList.addLast(5);
        mySingleLinkedList.display();
        mySingleLinkedList.addIndex(0,100);
        mySingleLinkedList.addIndex(2,908);
        mySingleLinkedList.addIndex(4,908);
        mySingleLinkedList.addIndex(5,1900);
        mySingleLinkedList.display();
        mySingleLinkedList.remove(1);
        mySingleLinkedList.display();
        mySingleLinkedList.removeAllKey(3);
        mySingleLinkedList.removeAllKey(2);
        mySingleLinkedList.removeAllKey(1);
        mySingleLinkedList.display();

    }
}
